<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>预约详情</title>

    <link rel="stylesheet" href="../css/page-health-orderDetail.css" />

    <script src="../js/axios-0.18.0.js"></script>
    <script src="../js/vue.js"></script>
</head>

<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left" onclick="goBack()"><i class="icon-back"></i>返回</span>
        <span class="center">千锋健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="card">
            <div class="project-img">
                <img src="../img/aaa.jpg" width="100%" height="100%" />
            </div>
        </div>
        <div class="table-listbox">
            <div class="box-title">
                <i class="icon-zhen"><span class="path1"></span><span class="path2"></span></i>
                <span>检查详情</span>
            </div>

            <div class="box-table">
                <div class="table-title">
                    <div class="tit-item flex2">检查项目名称</div>
                    <div class="tit-item  flex3">检查结果</div>
                </div>
                <div class="table-content" v-for="checkgroup in checkgroups">
                    <ul class="table-list">
                        <li class="table-item">
                            <div style="padding-left: 30px" class="item flex2">{{checkgroup.name}}</div>
                            <div style="padding-left: 150px" class="item flex3">正常</div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<script>
    function goBack() {
        window.history.back();
    }
    function getUrlParams (name) {
        let url = window.location.href;
        let tstr = url.substring(url.indexOf('?') + 1).split('&');
        let result = {};
        tstr.forEach((item) => {
            let res = item.split('=');
            result[res[0]] = res[1];
        });
        return result[name];
    };

    let fileNumber = getUrlParams("fileNumber");

    new Vue({
        el:"#app",
        data:{
            checkgroups:[]
        },
        methods:{
            findReportDetail(){
                let token = localStorage.getItem("security_token");
                if (!token){
                    token = "";
                }
                axios({
                    url:`http://localhost:8081/reportDetail/${fileNumber}`,
                    method:"GET",
                    headers:{
                        token:token
                    }
                }).then(resp=>{
                    let r = resp.data;
                    if (r.code == 200){
                        this.checkgroups = r.data;
                    }else if (r.data == 401){
                        alert(r.message)
                    }else {
                        alert(r.message)
                    }
                })
            }
        },
        mounted(){
            this.findReportDetail();
        }
    })
</script>
</body>